import axiosInstance from "@/api/axiosInstance"

export const postLogin = function (data) {
    return axiosInstance.post("/auth/login", data);
};

export const sendLoginCode = function (data: string) {
    return axiosInstance.get(`/auth/code?mobile=${data}`);
};

export const getUserInfo = function () {
    return axiosInstance.get('/account/info');
};

export const editUserProfile = function (data) {
    return axiosInstance.post('/account/modifyInfo', data);
};

export const getGrainInfo = function () {
    return axiosInstance.get('/account/grain/info');
};

export const getMeetQuestionList = function () {
    return axiosInstance.get('/auth/issues/list');
};

export const postIssues = function (data) {
    return axiosInstance.post('/auth/issue/click',data);
};

export const postLoginOut = function () {
    return axiosInstance.post("/auth/logout")
};

export const getImTokenAdmin = function () {
    return axiosInstance.get('/auth/getImAdminToken');
};

export const getUserAgreement = function () {
    return axiosInstance.get('/auth/userAgreement');
};

export const getPrivacyPolicy = function () {
    return axiosInstance.get('/auth/privacyPolicy');
};
